home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
- ############################################################################
- # Copyright (C) 2005 by Patrick J. Verner #
- # exodusrobot@yahoo.com #
- # #
- # This program is free software; you can redistribute it and/or modify #
- # it under the terms of the GNU General Public License as published by #
- # the Free Software Foundation; either version 2 of the License, or #
- # (at your option) any later version. #
- ############################################################################
-
- #make sure temp exists
- temp=/tmp/lang
- temp1=/tmp/lang
- if [ ! -d $temp1 ]
- then
- mkdir -p $temp1
- chmod 700 $temp1
- fi
-
- #These don't work yet, PLEASE! help me remove them from the "doesn't work" list :)
- #"Bulgarian" "" \ - doesn't work yet!
- #"Hebrew" "" \ - doesn't work yet!
- #"Macedonian" "" \ - doesn't work yet!
- #"Punjabi" "" \ - doesn't work yet!
- #"Russian" "" \ - doesn't work yet!
- #"Kinyarwanda" "" \ - doesn't work yet!
- #"Ukrainian" "" \ - doesn't work yet!
- #"Simplified Chinese" "" \ - doesn't work yet!
- #"Traditional Chinese" "" \ - doesn't work yet!
-
- #**********main menu**********
- item="US English"
- while [ 0 ]
- do
- dialog --title "GParted LiveCD Language" --default-item "$item" --backtitle "GParted Livecd" --menu "Select your Language:" 20 40 11 \
- "US English" "" \
- "Catalan" "" \
- "Czech" "" \
- "German" "" \
- "Greek" "" \
- "British English" "" \
- "Spanish" "" \
- "Finnish" "" \
- "French" "" \
- "Galician" "" \
- "Hungarian" "" \
- "Lithuanian" "" \
- "Dutch" "" \
- "Portuguese" "" \
- "Swedish" "" \
- "Vietnamese" "" \
- 2> $temp1/return
- if [ ! $? = 0 ]
- then
- break
- fi
- REPLY=`cat $temp1/return`
- rm -f $temp1/return
-
- #US ENGLISH
- if [ "$REPLY" = "US English" ]
- then
- cat >> ~/.xinitrc << "EOF"
- #!/bin/sh
- startfluxbox
- EOF
- chmod a+rwx /root/.xinitrc
- break
- fi
-
- #Bulgarian
- #if [ "$REPLY" = "Bulgarian" ]
- # then
- #cp /root/lang/Bulgarian /root/.fluxbox/apps
- #LC_ALL=bg_BG - doesn't work yet!
- #break
- #fi
-
- #Catalan
- if [ "$REPLY" = "Catalan" ]
- then
- cat >> ~/.xinitrc << "EOF"
- #!/bin/sh
- LC_ALL=ca_ES
- startfluxbox
- EOF
- chmod a+rwx /root/.xinitrc
- #LC_ALL=ca_ES
- break
- fi
-
- #Czech
- if [ "$REPLY" = "Czech" ]
- then
- cat >> ~/.xinitrc << "EOF"
- #!/bin/sh
- LC_ALL=cs_CZ
- startfluxbox
- EOF
- chmod a+rwx /root/.xinitrc
- #LC_ALL=cs_CZ
- break
- fi
-
- #German
- if [ "$REPLY" = "German" ]
- then
- cat >> ~/.xinitrc << "EOF"
- #!/bin/sh
- LC_ALL=de_DE
- startfluxbox
- EOF
- chmod a+rwx /root/.xinitrc
- #LC_ALL=de_DE
- break
- fi
-
- #Greek
- if [ "$REPLY" = "Greek" ]
- then
- cat >> ~/.xinitrc << "EOF"
- #!/bin/sh
- LC_ALL=el_GR
- startfluxbox
- EOF
- chmod a+rwx /root/.xinitrc
- #LC_ALL=el_GR
- break
- fi
-
- #British English
- if [ "$REPLY" = "British English" ]
- then
- cat >> ~/.xinitrc << "EOF"
- #!/bin/sh
- LC_ALL=en_GB
- startfluxbox
- EOF
- chmod a+rwx /root/.xinitrc
- #LC_ALL=en_GB
- break
- fi
-
- #Spanish
- if [ "$REPLY" = "Spanish" ]
- then
- cat >> ~/.xinitrc << "EOF"
- #!/bin/sh
- LC_ALL=es_ES
- startfluxbox
- EOF
- chmod a+rwx /root/.xinitrc
- #LC_ALL=es_ES
- break
- fi
-
- #Finnish
- if [ "$REPLY" = "Finnish" ]
- then
- cat >> ~/.xinitrc << "EOF"
- #!/bin/sh
- LC_ALL=fi_FI
- startfluxbox
- EOF
- chmod a+rwx /root/.xinitrc
- #LC_ALL=fi_FI
- break
- fi
-
- #French
- if [ "$REPLY" = "French" ]
- then
- cat >> ~/.xinitrc << "EOF"
- #!/bin/sh
- LC_ALL=fr_FR
- startfluxbox
- EOF
- chmod a+rwx /root/.xinitrc
- #LC_ALL=fr_FR
- break
- fi
-
- #Galician
- if [ "$REPLY" = "Galician" ]
- then
- cat >> ~/.xinitrc << "EOF"
- #!/bin/sh
- LC_ALL=gl_ES
- startfluxbox
- EOF
- chmod a+rwx /root/.xinitrc
- #LC_ALL=gl_ES
- break
- fi
-
- #Hebrew
- #if [ "$REPLY" = "Hebrew" ]
- # then
- #cp /root/lang/Hebrew /root/.fluxbox/apps
- #cp /root/lang/Hebrewm /root/.fluxbox/menu
- #LC_ALL=he_IL - doesn't work yet!
- #break
- #fi
-
- #Hungarian
- if [ "$REPLY" = "Hungarian" ]
- then
- cat >> ~/.xinitrc << "EOF"
- #!/bin/sh
- LC_ALL=hu_HU
- startfluxbox
- EOF
- chmod a+rwx /root/.xinitrc
- #LC_ALL=hu_HU
- break
- fi
-
- #Italian
- if [ "$REPLY" = "Italian" ]
- then
- cat >> ~/.xinitrc << "EOF"
- #!/bin/sh
- LC_ALL=it_IT
- startfluxbox
- EOF
- chmod a+rwx /root/.xinitrc
- #LC_ALL=it_IT
- break
- fi
-
- #Lithuanian
- if [ "$REPLY" = "Lithuanian" ]
- then
- cat >> ~/.xinitrc << "EOF"
- #!/bin/sh
- LC_ALL=lt_LT
- startfluxbox
- EOF
- chmod a+rwx /root/.xinitrc
- #LC_ALL=lt_LT
- break
- fi
-
- #Macedonian
- #if [ "$REPLY" = "Macedonian" ]
- # then
- #cp /root/lang/Macedonian /root/.fluxbox/apps
- #cp /root/lang/Macedonianm /root/.fluxbox/menu
- #LC_ALL=mk_MK - doesn't work yet!
- #break
- #fi
-
- #Dutch
- if [ "$REPLY" = "Dutch" ]
- then
- cat >> ~/.xinitrc << "EOF"
- #!/bin/sh
- LC_ALL=nl_NL
- startfluxbox
- EOF
- chmod a+rwx /root/.xinitrc
- #LC_ALL=nl_NL
- break
- fi
-
- #Punjabi
- #if [ "$REPLY" = "Punjabi" ]
- # then
- #cp /root/lang/Punjabi /root/.fluxbox/apps
- #cp /root/lang/Punjabim /root/.fluxbox/menu
- #LC_ALL=pa_IN - doesn't work yet!
- #break
- #fi
-
- #Portuguese
- if [ "$REPLY" = "Portuguese" ]
- then
- cat >> ~/.xinitrc << "EOF"
- #!/bin/sh
- LC_ALL=pt_PT
- startfluxbox
- EOF
- chmod a+rwx /root/.xinitrc
- #LC_ALL=pt_PT
- break
- fi
-
- #Russian
- #if [ "$REPLY" = "Russian" ]
- # then
- #cp /root/lang/Russian /root/.fluxbox/apps
- #cp /root/lang/Russianm /root/.fluxbox/menu
- #LC_ALL=ru_RU - doesn't work yet!
- #break
- #fi
-
- #Kinyarwanda
- #if [ "$REPLY" = "Kinyarwanda" ]
- # then
- #cp /root/lang/Kinyarwanda /root/.fluxbox/apps
- #cp /root/lang/Kinyarwandam /root/.fluxbox/menu
- #LC_ALL=rw_RW - doesn't work yet!
- #break
- #fi
-
- #Swedish
- if [ "$REPLY" = "Swedish" ]
- then
- cat >> ~/.xinitrc << "EOF"
- #!/bin/sh
- LC_ALL=sv_SE
- startfluxbox
- EOF
- chmod a+rwx /root/.xinitrc
- #LC_ALL=sv_SE
- break
- fi
-
- #Ukrainian
- #if [ "$REPLY" = "Ukrainian" ]
- # then
- #cp /root/lang/Ukrainian /root/.fluxbox/apps
- #cp /root/lang/Ukrainianm /root/.fluxbox/menu
- #LC_ALL=uk_UA - doesn't work yet!
- #break
- #fi
-
- #Vietnamese
- if [ "$REPLY" = "Vietnamese" ]
- then
- cat >> ~/.xinitrc << "EOF"
- #!/bin/sh
- LC_ALL=vi_VN
- startfluxbox
- EOF
- chmod a+rwx /root/.xinitrc
- #LC_ALL=vi_VN
- break
- fi
-
- #Simplified Chinese
- #if [ "$REPLY" = "Simplified Chinese" ]
- # then
- #cp /root/lang/SimplifiedChinese /root/.fluxbox/apps
- #cp /root/lang/SimplifiedChinesem /root/.fluxbox/menu
- #LC_ALL=zh_CN - doesn't work yet!
- #break
- #fi
-
- #Traditional Chinese
- #if [ "$REPLY" = "Traditional Chinese" ]
- # then
- #cp /root/lang/TraditionalChinese /root/.fluxbox/apps
- #cp /root/lang/TraditionalChinesem /root/.fluxbox/menu
- #LC_ALL=zh_TW - doesn't work yet!
- #break
- #fi
- done